package com.cskaoyan.demo1;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;

import java.io.IOException;

/**
 * 继承GenericServlet
 * 实现其抽象方法service
 * localhost:8080/demo1/servlet1
 */
@WebServlet(urlPatterns = "/servlet1")
public class Servlet1 extends GenericServlet {
    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("hello servlet1");
    }
}
